﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Graphe.Windows.Dialogs
{
    /// <summary>
    /// Interaction logic for EditVariantDialog.xaml
    /// </summary>
    public partial class EditVariantDialog : Window
    {
        #region Constructor

        public EditVariantDialog()
        {
            InitializeComponent();

            Loaded += new RoutedEventHandler(EditVariantDialog_Loaded);
        }

        #endregion
        #region Public Properties

        public string VerseText { get; set; }

        public string BaseText
        {
            get
            {
                return _textBoxBaseText.Text;
            }
            set
            {
                _textBoxBaseText.Text = value;
            }
        }

        public string ReadingText
        {
            get { return _textBoxReadingText.Text; }
            set { _textBoxReadingText.Text = value; }
        }

        public string Manuscript
        {
            get { return _textBoxManuscript.Text; }
            set { _textBoxManuscript.Text = value; }
        }

        public string ReadingType
        {
            get { return _comboBoxReadingType.Text; }
            set { _comboBoxReadingType.Text = value; }
        }

        public string Corrector
        {
            get { return _textBoxCorrector.Text; }
            set { _textBoxCorrector.Text = value; } 
        }

        #endregion

        private void EditVariantDialog_Loaded(object sender, RoutedEventArgs e)
        {
            _textBoxVerseText.Text = VerseText;
        }

        private void _buttonOk_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = true;
        }

        private void _buttonCancel_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = false;
        }

    }
}
